home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / bin / findcstr < prev    next >
Text File  |  1995-07-22  |  249b  |  19 lines

  1. :
  2. # findcstr - find a string in a C source file
  3.  
  4. CASE=
  5.  
  6. useage() {
  7.     echo "useage: findcstr [-y] string"
  8.     exit 1
  9. }
  10.  
  11. [ "$1" ] || useage
  12.  
  13. [ "$1" = "-y" ] && {
  14.     [ "$2" ] || useage
  15.     CASE=-y
  16.     shift
  17. }
  18. find . -name \*\.\[ch\] -print | xargs grep $CASE "$1"
  19.